try {
  doSomething();
} catch (e) {
  console.error(e); // ✅ 有处理逻辑
  throw e;
}

function doSomething() {}